package cn.ven.service;

import cn.ven.dao.BlogDao;
import cn.ven.dao.TypeDao;
import cn.ven.entity.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {

    @Autowired
    TypeDao typeDao;

    @Autowired
    BlogDao blogDao;

    @Override
    public List<Type> findAll() {
        return typeDao.findAll();
    }

    @Override
    public Type findById(String id) {
        return typeDao.findById(id);
    }

    @Override
    public void addType(Type type) {
        typeDao.addType(type);
    }

    @Override
    public void delType(String id) {
        typeDao.delType(id);
    }

    @Override
    public Type findTypeByType(String type) {

        return typeDao.findTypeByType(type);
    }


}
